<?php
namespace GrouppaGroup;
require_once 'MessageFromServer.php';
/**
 * Class to for a simple error message
 * @author s121170
 *
 */
class ErrorMessage extends MessageFromServer
{
    /**
     * function to create a simple error message
     */
    public function __construct($text, $messageType = 'error', $fromController =
        'System', $responseToId = -1)
    {
        //CHECK: create a simple message with error
        $this->id = self::getNewId();
        $this->fromController = $fromController;
        $this->messageType = $messageType;
        $this->responseToId = $responseToId;
        $this->serializedArguments = '"' . $text . '"';
        $this->statusOK = false;
        $this->toController = '';
        $this->toTask = '';
    }
}
